package com.wtwd.device.dao;


import com.wtwd.device.model.entity.BloodSugarRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mjy
 * @date 2021/09/06
 * @description
 */
@Mapper
public interface BloodSugarRecordMapper {
    List<BloodSugarRecord> getDaysBloodSugarRecordList(@Param("deviceId") Long deviceId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<BloodSugarRecord> getMonthBloodSugarRecordList(@Param("deviceId") Long deviceId,@Param("month") String month);

    Integer addBloodSugarRecord(BloodSugarRecord bloodSugarRecord);

    BloodSugarRecord getBloodSugarRecordByDeviceIdAndTime(@Param("deviceId") Long deviceId,@Param("time") String time);

    Integer clearBloodSugarRecordByDate(@Param("date") String date);

    Integer deleteBloodSugarRecordByDeviceId(@Param("id") Long id);

}
